package com.baiyue.controller;


import com.baiyue.entity.PaymentRecords;
import com.baiyue.model.PaymentRecords.PaymentRecordsDataRequest;
import com.baiyue.result.Result;
import com.baiyue.service.PaymentRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 *
 * @author 伍波
 * @date 2024-07-11
 */
@RestController
@RequestMapping("/api/paymentRecords")
public class PaymentRecordsController {
    @Autowired
    private PaymentRecordsService paymentRecordsService;

    @PostMapping("/checkout")
    public Result<Boolean> addPaymentRecords(@RequestBody PaymentRecordsDataRequest request) {
        paymentRecordsService.insertPaymentRecords(request);
        return Result.success(true);
    }
}

